package org.wanda.pv.model.basic;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.nutz.dao.entity.annotation.*;
import org.wanda.pv.framework.base.BaseModel;

import java.util.List;

/**
 * @author lxy
 * @date 2018/11/15 11:12
 */
@Comment("要点等级")
@Table("wd_point_class")
public class PointClass extends BaseModel {
    @Column
    @Id
    @Prev(els = {@EL("$me.idGen()")})
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;


    @Comment("要点等级名称")
    @Column("point_class_name")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String name;

    @Comment("分数")
    @Column
    @ColDefine(type = ColType.FLOAT)
    private float score;

    @Many(field = "pointClassId")
    private List<Point> points;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<Point> getPoints() {
        return points;
    }

    public void setPoints(List<Point> points) {
        this.points = points;
    }

    public float getScore() {
        return score;
    }

    public void setScore(float score) {
        this.score = score;
    }
}
